CREATE TABLE [dbo].[DnnProduct_UserProfile]
(
[ProfileID] [int] NOT NULL IDENTITY(1, 1),
[UserID] [int] NOT NULL,
[PropertyDefinitionID] [int] NOT NULL,
[PropertyValue] [nvarchar] (3750) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PropertyText] [nvarchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Visibility] [int] NOT NULL CONSTRAINT [DF__DnnProduct_UserP__Visib__1352D76D] DEFAULT ((0)),
[LastUpdatedDate] [datetime] NOT NULL,
[ExtendedVisibility] [varchar] (400) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[DnnProduct_UserProfile] ADD CONSTRAINT [PK_DnnProduct_UserProfile] PRIMARY KEY CLUSTERED  ([ProfileID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_DnnProduct_UserProfile] ON [dbo].[DnnProduct_UserProfile] ([UserID]) WITH (FILLFACTOR=85) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_DnnProduct_UserProfile_UserID_PropertyDefinitionID] ON [dbo].[DnnProduct_UserProfile] ([UserID], [PropertyDefinitionID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DnnProduct_UserProfile] WITH NOCHECK ADD CONSTRAINT [FK_DnnProduct_UserProfile_DnnProduct_ProfilePropertyDefinition] FOREIGN KEY ([PropertyDefinitionID]) REFERENCES [dbo].[DnnProduct_ProfilePropertyDefinition] ([PropertyDefinitionID]) ON DELETE CASCADE
GO
ALTER TABLE [dbo].[DnnProduct_UserProfile] WITH NOCHECK ADD CONSTRAINT [FK_DnnProduct_UserProfile_DnnProduct_Users] FOREIGN KEY ([UserID]) REFERENCES [dbo].[DnnProduct_Users] ([UserID]) ON DELETE CASCADE
GO
